package com.aaa.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 
 * @TableName mbs_member_level
 */
@ApiModel(description = "会员等级")
@TableName(value ="mbs_member_level")
@Data
public class MemberLevel implements Serializable {
    /**
     * 
     */
    @ApiModelProperty("id")
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 
     */
    @ApiModelProperty("名称")
    private String name;

    /**
     * 成长值
     */
    @ApiModelProperty("成长值")
    private Integer growthPoint;

    /**
     * 是否为默认等级：0->不是；1->是
     */
    @ApiModelProperty("是否为默认等级：0->不是；1->是")
    private Integer defaultStatus;

    /**
     * 免运费标准
     */
    @ApiModelProperty("免运费标准")
    private BigDecimal freeFreightPoint;

    /**
     * 是否有评论获奖励特权
     */
    @ApiModelProperty("是否有评论获奖励特权")
    private Integer priviledgeComment;

    /**
     * 是否有专享活动特权
     */
    @ApiModelProperty("是否有专享活动特权")
    private Integer priviledgePromotion;

    /**
     * 是否有会员价格特权
     */
    @ApiModelProperty("是否有会员价格特权")
    private Integer priviledgeMemberPrice;

    /**
     * 是否有生日特权
     */
    @ApiModelProperty("是否有生日特权")
    private Integer priviledgeBirthday;

    /**
     * 说明
     */
    @ApiModelProperty("说明")
    private String note;

    /**
     * 积分 普通1 白银1.2 黄金1.5....
     */
    @ApiModelProperty("积分 普通1 白银1.2 黄金1.5....")
    private Double ratio;

    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        MemberLevel other = (MemberLevel) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getGrowthPoint() == null ? other.getGrowthPoint() == null : this.getGrowthPoint().equals(other.getGrowthPoint()))
            && (this.getDefaultStatus() == null ? other.getDefaultStatus() == null : this.getDefaultStatus().equals(other.getDefaultStatus()))
            && (this.getFreeFreightPoint() == null ? other.getFreeFreightPoint() == null : this.getFreeFreightPoint().equals(other.getFreeFreightPoint()))
            && (this.getPriviledgeComment() == null ? other.getPriviledgeComment() == null : this.getPriviledgeComment().equals(other.getPriviledgeComment()))
            && (this.getPriviledgePromotion() == null ? other.getPriviledgePromotion() == null : this.getPriviledgePromotion().equals(other.getPriviledgePromotion()))
            && (this.getPriviledgeMemberPrice() == null ? other.getPriviledgeMemberPrice() == null : this.getPriviledgeMemberPrice().equals(other.getPriviledgeMemberPrice()))
            && (this.getPriviledgeBirthday() == null ? other.getPriviledgeBirthday() == null : this.getPriviledgeBirthday().equals(other.getPriviledgeBirthday()))
            && (this.getNote() == null ? other.getNote() == null : this.getNote().equals(other.getNote()))
            && (this.getRatio() == null ? other.getRatio() == null : this.getRatio().equals(other.getRatio()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getGrowthPoint() == null) ? 0 : getGrowthPoint().hashCode());
        result = prime * result + ((getDefaultStatus() == null) ? 0 : getDefaultStatus().hashCode());
        result = prime * result + ((getFreeFreightPoint() == null) ? 0 : getFreeFreightPoint().hashCode());
        result = prime * result + ((getPriviledgeComment() == null) ? 0 : getPriviledgeComment().hashCode());
        result = prime * result + ((getPriviledgePromotion() == null) ? 0 : getPriviledgePromotion().hashCode());
        result = prime * result + ((getPriviledgeMemberPrice() == null) ? 0 : getPriviledgeMemberPrice().hashCode());
        result = prime * result + ((getPriviledgeBirthday() == null) ? 0 : getPriviledgeBirthday().hashCode());
        result = prime * result + ((getNote() == null) ? 0 : getNote().hashCode());
        result = prime * result + ((getRatio() == null) ? 0 : getRatio().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", growthPoint=").append(growthPoint);
        sb.append(", defaultStatus=").append(defaultStatus);
        sb.append(", freeFreightPoint=").append(freeFreightPoint);
        sb.append(", priviledgeComment=").append(priviledgeComment);
        sb.append(", priviledgePromotion=").append(priviledgePromotion);
        sb.append(", priviledgeMemberPrice=").append(priviledgeMemberPrice);
        sb.append(", priviledgeBirthday=").append(priviledgeBirthday);
        sb.append(", note=").append(note);
        sb.append(", ratio=").append(ratio);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}